﻿<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>

  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Struct Reference </title>
    <meta name="viewport" content="width=device-width">
    <meta name="title" content="Struct Reference ">
    <meta name="generator" content="docfx ">
  
    <link rel="shortcut icon" href="../api/images/favicon.ico">
    <link rel="stylesheet" href="../styles/docfx.vendor.css">
    <link rel="stylesheet" href="../styles/docfx.css">
    <link rel="stylesheet" href="../styles/main.css">
    <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> 
    <meta property="docfx:navrel" content="../toc.html">
    <meta property="docfx:tocrel" content="toc.html">
    <script type="text/javascript" async="" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML"></script>
  
  
  
  </head>  <body data-spy="scroll" data-target="#affix" data-offset="120">
    <div id="wrapper">
      <header>

        <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
          <div class="container">
            <div class="navbar-header">
              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
              </button>

              <a class="navbar-brand" href="../index.html">
                <img id="logo" class="svg" src="../api/images/favicon.svg" alt="">
              </a>
            </div>
            <div class="collapse navbar-collapse" id="navbar">
              <form class="navbar-form navbar-right" role="search" id="search">
                <div class="form-group">
                  <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
                </div>
              </form>
            </div>
          </div>
        </nav>

        <div class="subnav navbar navbar-default">
          <div class="container hide-when-search" id="breadcrumb">
            <ul class="breadcrumb">
              <li></li>
            </ul>
          </div>
        </div>
      </header>
      <div role="main" class="container body-content hide-when-search">

        <div class="sidenav hide-when-search">
          <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
          <div class="sidetoggle collapse" id="sidetoggle">
            <div id="sidetoc"></div>
          </div>
        </div>
        <div class="article row grid-right">
          <div class="col-md-10">
            <article class="content wrap" id="_content" data-uid="SpiceSharp.Simulations.Base.Reference">



  <h1 id="SpiceSharp_Simulations_Base_Reference" data-uid="SpiceSharp.Simulations.Base.Reference" class="text-break">Struct Reference</h1>
  <div class="markdown level0 summary"><p>A reference to a hierarchical item.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable</a>&lt;<a class="xref" href="SpiceSharp.Simulations.Base.Reference.html">Reference</a>&gt;</div>
  </div>
  <div class="inheritedMembers">
    <h5>Inherited Members</h5>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
    </div>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
    </div>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
    </div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="SpiceSharp.html">SpiceSharp</a>.<a class="xref" href="SpiceSharp.Simulations.html">Simulations</a>.<a class="xref" href="SpiceSharp.Simulations.Base.html">Base</a></h6>
  <h6><strong>Assembly</strong>: SpiceSharp.dll</h6>
  <h5 id="SpiceSharp_Simulations_Base_Reference_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public readonly struct Reference : IEnumerable&lt;string&gt;, IEnumerable, IEquatable&lt;Reference&gt;</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <a id="SpiceSharp_Simulations_Base_Reference__ctor_" data-uid="SpiceSharp.Simulations.Base.Reference.#ctor*"></a>
  <h4 id="SpiceSharp_Simulations_Base_Reference__ctor_System_String_" data-uid="SpiceSharp.Simulations.Base.Reference.#ctor(System.String)">Reference(string)</h4>
  <div class="markdown level1 summary"><p>Creates a new <a class="xref" href="SpiceSharp.Simulations.Base.Reference.html">Reference</a>.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public Reference(string node)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
        <td><span class="parametername">node</span></td>
        <td><p>The node name.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Base_Reference__ctor_" data-uid="SpiceSharp.Simulations.Base.Reference.#ctor*"></a>
  <h4 id="SpiceSharp_Simulations_Base_Reference__ctor_System_String___" data-uid="SpiceSharp.Simulations.Base.Reference.#ctor(System.String[])">Reference(params string[])</h4>
  <div class="markdown level1 summary"><p>Creates a new <a class="xref" href="SpiceSharp.Simulations.Base.Reference.html">Reference</a>.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public Reference(params string[] path)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>[]</td>
        <td><span class="parametername">path</span></td>
        <td><p>The path.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <a id="SpiceSharp_Simulations_Base_Reference_Item_" data-uid="SpiceSharp.Simulations.Base.Reference.Item*"></a>
  <h4 id="SpiceSharp_Simulations_Base_Reference_Item_System_Int32_" data-uid="SpiceSharp.Simulations.Base.Reference.Item(System.Int32)">this[int]</h4>
  <div class="markdown level1 summary"><p>Gets an element of the hierarchical reference at the specified index.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public string this[int index] { get; }</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
        <td><span class="parametername">index</span></td>
        <td><p>The index.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="propertyValue">Property Value</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
        <td><p>Returns the path item at the specified index.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Base_Reference_Length_" data-uid="SpiceSharp.Simulations.Base.Reference.Length*"></a>
  <h4 id="SpiceSharp_Simulations_Base_Reference_Length" data-uid="SpiceSharp.Simulations.Base.Reference.Length">Length</h4>
  <div class="markdown level1 summary"><p>Gets the length of the path.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public int Length { get; }</code></pre>
  </div>
  <h5 class="propertyValue">Property Value</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Base_Reference_Path_" data-uid="SpiceSharp.Simulations.Base.Reference.Path*"></a>
  <h4 id="SpiceSharp_Simulations_Base_Reference_Path" data-uid="SpiceSharp.Simulations.Base.Reference.Path">Path</h4>
  <div class="markdown level1 summary"><p>Gets the path of the node.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IReadOnlyList&lt;string&gt; Path { get; }</code></pre>
  </div>
  <h5 class="propertyValue">Property Value</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1">IReadOnlyList</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <a id="SpiceSharp_Simulations_Base_Reference_Equals_" data-uid="SpiceSharp.Simulations.Base.Reference.Equals*"></a>
  <h4 id="SpiceSharp_Simulations_Base_Reference_Equals_SpiceSharp_Simulations_Base_Reference_" data-uid="SpiceSharp.Simulations.Base.Reference.Equals(SpiceSharp.Simulations.Base.Reference)">Equals(Reference)</h4>
  <div class="markdown level1 summary"><p>Determines whether the node reference is equal to another.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public bool Equals(Reference other)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Simulations.Base.Reference.html">Reference</a></td>
        <td><span class="parametername">other</span></td>
        <td><p>The other node reference.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
        <td><p>Returns <code>true</code> if both are equal; otherwise, <code>false</code>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Base_Reference_Equals_" data-uid="SpiceSharp.Simulations.Base.Reference.Equals*"></a>
  <h4 id="SpiceSharp_Simulations_Base_Reference_Equals_System_Object_" data-uid="SpiceSharp.Simulations.Base.Reference.Equals(System.Object)">Equals(object)</h4>
  <div class="markdown level1 summary"><p>Determines whether the object is equal to another.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public override bool Equals(object obj)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
        <td><span class="parametername">obj</span></td>
        <td><p>The other object.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
        <td><p>Returns <code>true</code> if both are equal; otherwise, <code>false</code>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="overrides">Overrides</h5>
  <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetype.equals">ValueType.Equals(object)</a></div>
  <a id="SpiceSharp_Simulations_Base_Reference_GetContainer_" data-uid="SpiceSharp.Simulations.Base.Reference.GetContainer*"></a>
  <h4 id="SpiceSharp_Simulations_Base_Reference_GetContainer_SpiceSharp_Simulations_ISimulation_" data-uid="SpiceSharp.Simulations.Base.Reference.GetContainer(SpiceSharp.Simulations.ISimulation)">GetContainer(ISimulation)</h4>
  <div class="markdown level1 summary"><p>Gets the behavior container that the hierarchical reference points to.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IBehaviorContainer GetContainer(ISimulation simulation)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Simulations.ISimulation.html">ISimulation</a></td>
        <td><span class="parametername">simulation</span></td>
        <td><p>The simulation.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Behaviors.IBehaviorContainer.html">IBehaviorContainer</a></td>
        <td><p>Returns the behavior container.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="exceptions">Exceptions</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Condition</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.BehaviorsNotFoundException.html">BehaviorsNotFoundException</a></td>
        <td><p>Thrown if a behavior collection could not be found.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Base_Reference_GetHashCode_" data-uid="SpiceSharp.Simulations.Base.Reference.GetHashCode*"></a>
  <h4 id="SpiceSharp_Simulations_Base_Reference_GetHashCode" data-uid="SpiceSharp.Simulations.Base.Reference.GetHashCode">GetHashCode()</h4>
  <div class="markdown level1 summary"><p>Calculates a hash code for the node reference.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public override int GetHashCode()</code></pre>
  </div>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h5 class="overrides">Overrides</h5>
  <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetype.gethashcode">ValueType.GetHashCode()</a></div>
  <a id="SpiceSharp_Simulations_Base_Reference_GetVariable_" data-uid="SpiceSharp.Simulations.Base.Reference.GetVariable*"></a>
  <h4 id="SpiceSharp_Simulations_Base_Reference_GetVariable__2_SpiceSharp_Simulations_ISimulation_" data-uid="SpiceSharp.Simulations.Base.Reference.GetVariable``2(SpiceSharp.Simulations.ISimulation)">GetVariable&lt;T, S&gt;(ISimulation)</h4>
  <div class="markdown level1 summary"><p>Gets the variable that the hierarchical reference points to.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IVariable&lt;T&gt; GetVariable&lt;T, S&gt;(ISimulation simulation) where S : ISolverSimulationState&lt;T&gt;</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Simulations.ISimulation.html">ISimulation</a></td>
        <td><span class="parametername">simulation</span></td>
        <td><p>The simulation.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Simulations.IVariable-1.html">IVariable</a>&lt;T&gt;</td>
        <td><p>Returns the variable.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">T</span></td>
        <td><p>The variable return type.</p>
</td>
      </tr>
      <tr>
        <td><span class="parametername">S</span></td>
        <td><p>The simulation state that needs to be used to find the variable.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="exceptions">Exceptions</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Condition</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Diagnostics.VariableNotFoundException.html">VariableNotFoundException</a></td>
        <td><p>Thrown if the variable could not be found.</p>
</td>
      </tr>
      <tr>
        <td><a class="xref" href="SpiceSharp.StateNotFoundException.html">StateNotFoundException</a></td>
        <td><p>Thrown if the simulation or entities behavior does not define the state.</p>
</td>
      </tr>
      <tr>
        <td><a class="xref" href="SpiceSharp.BehaviorsNotFoundException.html">BehaviorsNotFoundException</a></td>
        <td><p>Thrown if a behavior collection could not be found.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Base_Reference_GetVectorElement_" data-uid="SpiceSharp.Simulations.Base.Reference.GetVectorElement*"></a>
  <h4 id="SpiceSharp_Simulations_Base_Reference_GetVectorElement__2_SpiceSharp_Simulations_ISimulation_" data-uid="SpiceSharp.Simulations.Base.Reference.GetVectorElement``2(SpiceSharp.Simulations.ISimulation)">GetVectorElement&lt;T, S&gt;(ISimulation)</h4>
  <div class="markdown level1 summary"><p>Gets the right-hand side vector element that relates to the node the hierarchical reference points to.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public Element&lt;T&gt; GetVectorElement&lt;T, S&gt;(ISimulation simulation) where S : ISolverSimulationState&lt;T&gt;</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Simulations.ISimulation.html">ISimulation</a></td>
        <td><span class="parametername">simulation</span></td>
        <td><p>The simulation.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Algebra.Element-1.html">Element</a>&lt;T&gt;</td>
        <td><p>Returns the variable.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">T</span></td>
        <td><p>The variable return type.</p>
</td>
      </tr>
      <tr>
        <td><span class="parametername">S</span></td>
        <td><p>The simulation state that needs to be used to find the variable.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="exceptions">Exceptions</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Condition</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Diagnostics.VariableNotFoundException.html">VariableNotFoundException</a></td>
        <td><p>Thrown if the variable could not be found.</p>
</td>
      </tr>
      <tr>
        <td><a class="xref" href="SpiceSharp.StateNotFoundException.html">StateNotFoundException</a></td>
        <td><p>Thrown if the simulation or entities behavior does not define the state.</p>
</td>
      </tr>
      <tr>
        <td><a class="xref" href="SpiceSharp.BehaviorsNotFoundException.html">BehaviorsNotFoundException</a></td>
        <td><p>Thrown if a behavior collection could not be found.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Base_Reference_ToString_" data-uid="SpiceSharp.Simulations.Base.Reference.ToString*"></a>
  <h4 id="SpiceSharp_Simulations_Base_Reference_ToString" data-uid="SpiceSharp.Simulations.Base.Reference.ToString">ToString()</h4>
  <div class="markdown level1 summary"><p>Converts the node reference to a string.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public override string ToString()</code></pre>
  </div>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
        <td><p>The string.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="overrides">Overrides</h5>
  <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetype.tostring">ValueType.ToString()</a></div>
  <a id="SpiceSharp_Simulations_Base_Reference_TryGetContainer_" data-uid="SpiceSharp.Simulations.Base.Reference.TryGetContainer*"></a>
  <h4 id="SpiceSharp_Simulations_Base_Reference_TryGetContainer_SpiceSharp_Simulations_ISimulation_SpiceSharp_Behaviors_IBehaviorContainer__" data-uid="SpiceSharp.Simulations.Base.Reference.TryGetContainer(SpiceSharp.Simulations.ISimulation,SpiceSharp.Behaviors.IBehaviorContainer@)">TryGetContainer(ISimulation, out IBehaviorContainer)</h4>
  <div class="markdown level1 summary"><p>Tries to find a behavior container that the hierarchical reference points to.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public bool TryGetContainer(ISimulation simulation, out IBehaviorContainer container)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Simulations.ISimulation.html">ISimulation</a></td>
        <td><span class="parametername">simulation</span></td>
        <td><p>The simulation.</p>
</td>
      </tr>
      <tr>
        <td><a class="xref" href="SpiceSharp.Behaviors.IBehaviorContainer.html">IBehaviorContainer</a></td>
        <td><span class="parametername">container</span></td>
        <td><p>The behavior container.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
        <td><p>Returns <code>true</code> if the container could be found; otherwise, <code>false</code>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Base_Reference_TryGetVariable_" data-uid="SpiceSharp.Simulations.Base.Reference.TryGetVariable*"></a>
  <h4 id="SpiceSharp_Simulations_Base_Reference_TryGetVariable__2_SpiceSharp_Simulations_ISimulation_SpiceSharp_Simulations_IVariable___0___" data-uid="SpiceSharp.Simulations.Base.Reference.TryGetVariable``2(SpiceSharp.Simulations.ISimulation,SpiceSharp.Simulations.IVariable{``0}@)">TryGetVariable&lt;T, S&gt;(ISimulation, out IVariable&lt;T&gt;)</h4>
  <div class="markdown level1 summary"><p>Tries to find a variable that the hierarchical reference points to.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public bool TryGetVariable&lt;T, S&gt;(ISimulation simulation, out IVariable&lt;T&gt; variable) where S : ISolverSimulationState&lt;T&gt;</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Simulations.ISimulation.html">ISimulation</a></td>
        <td><span class="parametername">simulation</span></td>
        <td><p>The simulation.</p>
</td>
      </tr>
      <tr>
        <td><a class="xref" href="SpiceSharp.Simulations.IVariable-1.html">IVariable</a>&lt;T&gt;</td>
        <td><span class="parametername">variable</span></td>
        <td><p>The variable.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
        <td><p>Returns <code>true</code> if the variable was found; otherwise, <code>false</code>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">T</span></td>
        <td><p>The variable return type.</p>
</td>
      </tr>
      <tr>
        <td><span class="parametername">S</span></td>
        <td><p>The simulation state used to find the variable.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Base_Reference_TryGetVectorElement_" data-uid="SpiceSharp.Simulations.Base.Reference.TryGetVectorElement*"></a>
  <h4 id="SpiceSharp_Simulations_Base_Reference_TryGetVectorElement__2_SpiceSharp_Simulations_ISimulation_SpiceSharp_Algebra_Element___0___" data-uid="SpiceSharp.Simulations.Base.Reference.TryGetVectorElement``2(SpiceSharp.Simulations.ISimulation,SpiceSharp.Algebra.Element{``0}@)">TryGetVectorElement&lt;T, S&gt;(ISimulation, out Element&lt;T&gt;)</h4>
  <div class="markdown level1 summary"><p>Tries to find a right-hand side vector element that relates to the node the hierarchical reference points to.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public bool TryGetVectorElement&lt;T, S&gt;(ISimulation simulation, out Element&lt;T&gt; variable) where S : ISolverSimulationState&lt;T&gt;</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Simulations.ISimulation.html">ISimulation</a></td>
        <td><span class="parametername">simulation</span></td>
        <td><p>The simulation.</p>
</td>
      </tr>
      <tr>
        <td><a class="xref" href="SpiceSharp.Algebra.Element-1.html">Element</a>&lt;T&gt;</td>
        <td><span class="parametername">variable</span></td>
        <td><p>The variable.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
        <td><p>Returns <code>true</code> if the variable was found; otherwise, <code>false</code>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">T</span></td>
        <td><p>The variable return type.</p>
</td>
      </tr>
      <tr>
        <td><span class="parametername">S</span></td>
        <td><p>The simulation state used to find the variable.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="operators">Operators
</h3>
  <a id="SpiceSharp_Simulations_Base_Reference_op_Implicit_" data-uid="SpiceSharp.Simulations.Base.Reference.op_Implicit*"></a>
  <h4 id="SpiceSharp_Simulations_Base_Reference_op_Implicit_System_Collections_Generic_List_System_String___SpiceSharp_Simulations_Base_Reference" data-uid="SpiceSharp.Simulations.Base.Reference.op_Implicit(System.Collections.Generic.List{System.String})~SpiceSharp.Simulations.Base.Reference">implicit operator Reference(List&lt;string&gt;)</h4>
  <div class="markdown level1 summary"><p>Implicitly converts a list of strings to a node reference.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public static implicit operator Reference(List&lt;string&gt; path)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;</td>
        <td><span class="parametername">path</span></td>
        <td><p>The path.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Simulations.Base.Reference.html">Reference</a></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Base_Reference_op_Implicit_" data-uid="SpiceSharp.Simulations.Base.Reference.op_Implicit*"></a>
  <h4 id="SpiceSharp_Simulations_Base_Reference_op_Implicit_System_String__SpiceSharp_Simulations_Base_Reference" data-uid="SpiceSharp.Simulations.Base.Reference.op_Implicit(System.String)~SpiceSharp.Simulations.Base.Reference">implicit operator Reference(string)</h4>
  <div class="markdown level1 summary"><p>Implicitly converts a string to a node reference.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public static implicit operator Reference(string node)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
        <td><span class="parametername">node</span></td>
        <td><p>The node name.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Simulations.Base.Reference.html">Reference</a></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Base_Reference_op_Implicit_" data-uid="SpiceSharp.Simulations.Base.Reference.op_Implicit*"></a>
  <h4 id="SpiceSharp_Simulations_Base_Reference_op_Implicit_System_String____SpiceSharp_Simulations_Base_Reference" data-uid="SpiceSharp.Simulations.Base.Reference.op_Implicit(System.String[])~SpiceSharp.Simulations.Base.Reference">implicit operator Reference(string[])</h4>
  <div class="markdown level1 summary"><p>Implicitly converts an array of strings to a node reference.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public static implicit operator Reference(string[] path)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>[]</td>
        <td><span class="parametername">path</span></td>
        <td><p>The path.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Simulations.Base.Reference.html">Reference</a></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h3 id="implements">Implements</h3>
  <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable&lt;T&gt;</a>
  </div>
  <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a>
  </div>
  <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable&lt;T&gt;</a>
  </div>
  <h3 id="extensionmethods">Extension Methods</h3>
  <div>
      <a class="xref" href="SpiceSharp.Utility.html#SpiceSharp_Utility_ThrowIfNull__1___0_System_String_">Utility.ThrowIfNull&lt;T&gt;(T, string)</a>
  </div>
  <div>
      <a class="xref" href="SpiceSharp.Utility.html#SpiceSharp_Utility_ThrowIfEmpty__1_System_Collections_Generic_IEnumerable___0__System_String_">Utility.ThrowIfEmpty&lt;T&gt;(IEnumerable&lt;T&gt;, string)</a>
  </div>
  <h3 id="seealso">See Also</h3>
  <div class="seealso">
      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;T&gt;</div>
      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable</a>&lt;T&gt;</div>
  </div>

</article>
          </div>

          <div class="hidden-sm col-md-2" role="complementary">
            <div class="sideaffix">
              <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
                <h5>In this article</h5>
                <div></div>
              </nav>
            </div>
          </div>
        </div>
      </div>

      <footer>
        <div class="grad-bottom"></div>
        <div class="footer">
          <div class="container">
            <span class="pull-right">
              <a href="#top">Back to top</a>
            </span>
      
      <span>Generated by <strong>DocFX</strong></span>
          </div>
        </div>
      </footer>
    </div>

    <script type="text/javascript" src="../styles/docfx.vendor.min.js"></script>
    <script type="text/javascript" src="../styles/docfx.js"></script>
    <script type="text/javascript" src="../styles/main.js"></script>
  </body>
</html>
